package readxml;


import java.io.IOException;
import java.util.Scanner;
import javax.xml.parsers.ParserConfigurationException;



import org.xml.sax.SAXException;



public class Main {

	private static Scanner scanln;

	public static void main(String[] args) throws SAXException, ParserConfigurationException, IOException {
		scanln = new Scanner(System.in);
		System.out.println("Nhap vao file can doc: ");
		String fileName=scanln.nextLine();
		ReadXML ngoc= new ReadXML();
		ngoc.readXML(fileName);
		
		
		
		/*XmlFacade xml = new XmlFacade("<XF/>");
		xml.set("/XF/Test[@no='1']", true);
		xml.set("/XF/Test[@no='2']", 14);
		xml.set("/XF/Test[@no='3']", "Hello World");
		System.out.println(xml);

		List<String> list = new Vector<String>();
		list.add("Daria");
		list.add("Trent");
		list.add("Quinn");
		list.add("Helen");
		list.add("Jake");
		list.add("Jane");
		list.add("Tiffany");
		xml.setList("/XF/Test[@no='4']/Morgendorffer/@name", list);
		list.remove("Helen");
		xml.setList("/XF/Test[@no='4']/Morgendorffer/@name", list);
		list.add("Sandi");
		xml.setList("/XF/Test[@no='4']/Morgendorffer/@name", list);
		list.add(3, "Stacey");
		xml.setList("/XF/Test[@no='4']/Morgendorffer/@name", list);
		System.out.println(xml);

		Map<String, String> map = new LinkedHashMap<String, String>();
		map.put("Daria","F");
		map.put("Quinn","F");
		map.put("Helen","F");
		map.put("Jane","F");
		map.put("Tiffany","F");
		map.put("Trent","M");
		map.put("Jake","M");
		xml.setMap("/XF/Test[@no='5']/Morgendorffer", "@name", null, map);
		map.remove("Tiffany");
		xml.setMap("/XF/Test[@no='5']/Morgendorffer", "@name", null, map);
		map.put("Stacey","F");
		xml.setMap("/XF/Test[@no='5']/Morgendorffer", "@name", null, map);
		System.out.println(xml);*/
		}
		}
		